<?php
class tuyenxeController
{	
	public function run()
	{
		include("DBHelper.php");
		$ketnoi= new DBHelper();
		$tuyenxe = new tuyenxeController();
		$rows= $ketnoi->getAll($tuyenxe->getAll());
		return $rows;
	}
	public function getAll()
	{
		$sql = "SELECT * FROM tuyenxe";
		return $sql;
		
	}
	public function insert($id_tuyen,$ten_tuyen,$tramkhoihanh,$tramdich,$thoigian,$giatien)
	{
		$sql="INSERT INTO tuyenxe(id_tuyen,ten_tuyen,tramkhoihanh,tramdich,thoigian,giatien) VALUES (:id_tuyen,:ten_tuyen,:tramkhoihanh,:tramdich,:thoigian,:giatin)";
    	
		return $sql;
		
	}
	public function update($id)
	{
		$sql="UPDATE sinhvien SET hoten= ?,diachi= ?,cmnd= ?,sodt = ?,gioitinh= ? WHERE id=".$id;
		return $sql;
	}
	public function delete($id)
	{
		$sql="UPDATE FROM sinhvien  WHERE id=".$id;
		return $sql;
	}
	
}
?>
